package com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.entity.vo.SmsTeachAdministrativeStaffCheckInApplicationDetailVO;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.service.SmsTeachAdministrativeStaffCheckInApplicationDetailService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-05-05
 */
@RestController
@RequestMapping("/teachAndStaffCheckInApplication/smsTeachAdministrativeStaffCheckInApplicationDetail")
public class SmsTeachAdministrativeStaffCheckInApplicationDetailController {
    @Autowired
    SmsTeachAdministrativeStaffCheckInApplicationDetailService smsTeachAdministrativeStaffCheckInApplicationDetailService;
    @ApiOperation("新增流程详情")
    @PostMapping("/smsTeachAdministrativeStaffCheckInApplicationDetailAdd")
    public ResponseResult smsTeachAdministrativeStaffCheckInApplicationDetailAdd(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationDetailVO smsTeachAdministrativeStaffCheckInApplicationDetail){
        return smsTeachAdministrativeStaffCheckInApplicationDetailService.smsTeachAdministrativeStaffCheckInApplicationDetailAdd(
                smsTeachAdministrativeStaffCheckInApplicationDetail);
    }

    @ApiOperation("删除流程详情")
    @DeleteMapping("/deleteSmsTeachAdministrativeStaffCheckInApplicationDetail")
    public ResponseResult deleteSmsTeachAdministrativeStaffCheckInApplicationDetail(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationDetailVO smsTeachAdministrativeStaffCheckInApplicationDetail){
        return smsTeachAdministrativeStaffCheckInApplicationDetailService.deleteSmsTeachAdministrativeStaffCheckInApplicationDetail(
                smsTeachAdministrativeStaffCheckInApplicationDetail);
    }

    @ApiOperation("修改流程详情")
    @PostMapping("/updateSmsTeachAdministrativeStaffCheckInApplicationDetail")
    public ResponseResult updateSmsTeachAdministrativeStaffCheckInApplicationDetail(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationDetailVO smsTeachAdministrativeStaffCheckInApplicationDetail){
        return smsTeachAdministrativeStaffCheckInApplicationDetailService.updateSmsTeachAdministrativeStaffCheckInApplicationDetail(
                smsTeachAdministrativeStaffCheckInApplicationDetail);
    }

    @ApiOperation("查询流程详情")
    @GetMapping("/selectSmsTeachAdministrativeStaffCheckInApplicationDetail")
    public ResponseResult selectSmsTeachAdministrativeStaffCheckInApplicationDetail(@RequestParam(value = "search_str", required = false) String search_str,
                                                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                         @RequestParam(value = "bg_date", required = false) String bg_date,
                                                         @RequestParam(value = "end_date", required = false) String end_date) {
        return smsTeachAdministrativeStaffCheckInApplicationDetailService.selectSmsTeachAdministrativeStaffCheckInApplicationDetail(
                search_str,
                pageSize,
                pageNum,
                bg_date,
                end_date);
    }
    @ApiOperation("通过ID查询流程详情")
    @GetMapping("/selectSmsTeachAdministrativeStaffCheckInApplicationDetailById")
    public ResponseResult selectSmsTeachAdministrativeStaffCheckInApplicationDetailById(@RequestParam(value = "id", required = false) String id
    ) {
        return smsTeachAdministrativeStaffCheckInApplicationDetailService.selectSmsTeachAdministrativeStaffCheckInApplicationDetailById(id);
    }
}

